/**
 * @author
 * @version V1.0
 */
package com.hc.service.service.impl;

import com.hc.comm.base.BaseServiceImpl;
import com.hc.comm.mapper.Mapper;
import com.hc.service.dao.AppMonitorMapper;
import com.hc.service.model.AppMonitorModel;
import com.hc.service.service.IAppMonitorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * app性能监控表的业务实现类
 *
 * @author
 */
@Service("appMonitorService")
public class AppMonitorServiceImpl extends BaseServiceImpl<AppMonitorModel>
        implements IAppMonitorService {


    @Resource(name = "appMonitorMapper")
    private AppMonitorMapper appMonitorMapper;

    @Override
    protected Mapper<AppMonitorModel> getMapper() {
        return appMonitorMapper;
    }

    /**
     * 查询当前页面的加载时间
     *
     * @param currentName
     * @param startTime
     * @param endTime
     * @return
     */
    @Override
    public int getLoadTimeCount(String currentName, String startTime, String endTime, String platform, String startData, String endData) {
        return appMonitorMapper.getLoadTimeCount(currentName, startTime, endTime, platform, startData, endData);
    }

    /**
     * 查询也卖你的停留时间分段
     *
     * @param currentName
     * @param startTime
     * @param endTime
     * @return
     */
    @Override
    public int getStayTimeCount(String currentName, String startTime, String endTime, String platform, String startData, String endData) {
        return appMonitorMapper.getStayTimeCount(currentName, startTime, endTime, platform, startData, endData);
    }

    @Override
    public List getAllUrlNum(int pageStart, int pageEnd, String platform) {
        return appMonitorMapper.getAllUrlNum(pageStart, pageEnd, platform);
    }

    @Override
    public List getUrlState(String urlName, Integer netState, String yjdUrlState,
                            String startTime, String endTime,
                            String reqStartTime, String reqEndTime,
                            String platform) {
        return appMonitorMapper.getUrlState(urlName, netState, yjdUrlState,
                startTime, endTime,
                reqStartTime, reqEndTime,
                platform);
    }

    @Override
    public List getAllPageName(String platform) {
        return appMonitorMapper.getAllPageName(platform);
    }

    @Override
    public List getUrlStateCount(int pageStart, int pageEnd, String platform) {
        return appMonitorMapper.getUrlStateCount(pageStart, pageEnd, platform);
    }

    @Override
    public List getPageStateCount(int pageStart, int pageEnd, String platform) {
        return appMonitorMapper.getPageStateCount(pageStart, pageEnd, platform);
    }
}
